function save_csv(struct_data,new_folder_path,subject_num,Files,j)

% save .csv file
file_name = strcat(new_folder_path{1,1},'//',subject_num,'_roi_',regexp(Files(j).name, '//.', 'split'));
%fid = fopen(strcat(synergy_sim_save,file_name{1,1},'_roi.csv'), 'w');

%struct2table
data_table = struct2table(struct_data);
writetable(data_table,file_name{1,1})

end

